import {NgModule} from "@angular/core";
import {FormsModule,ReactiveFormsModule} from "@angular/forms";
import {RouterModule} from "@angular/router";
import { CarouselModule } from 'ng2-bootstrap/carousel';
import {CommonModule} from "@angular/common";//CommonModule使用ngfor等指令是必须导入否则报错
// Can't bind to 'ng-forOf' since it isn't a known native property

import { PaginationModule } from 'ng2-bootstrap/pagination';//增加分页模块

import {ArticleComponent} from "./article.component";
import {articleRoutesConfig} from "./article.routes";
import {ArticleDetailComponent} from "./article-detail/article-detail.component";
import {ArticleListComponent} from "./article-list/article-list.component";
import {ArticleCommentComponent} from "./article-comment/article-comment.component";
import {ArticleWriteComponent} from "./article-write/article-write.component";
import {TinyMCEComponent} from "../common/TinyMCE/TinyMCE.component";
import {CarouselComponent} from "../common/Carousel/Carousel.component";
import {UserModule} from "../user/user.module";
import {SearchComponent} from "../common/search/search.component";

@NgModule({
declarations: [
    ArticleComponent,
    ArticleCommentComponent,
    ArticleListComponent,
    ArticleDetailComponent,
    ArticleWriteComponent,
    TinyMCEComponent,
    CarouselComponent,
    SearchComponent
    ],
  imports: [
    FormsModule,
    CommonModule,
    UserModule,
    ReactiveFormsModule,
    RouterModule.forChild(articleRoutesConfig),
    CarouselModule.forRoot(),
    PaginationModule.forRoot()
  ],
  exports:[],
  providers: [],
  bootstrap: [ArticleComponent]
})
export class ArticleModule{

}